import request from '@/config/axios'

// 交互日志 VO
export interface InteractionLogVO {
  logId: string // 日志id
  userId: number // 用户id
  sessionId: number // 会话id
  wsSessionId: string // 对话id
  traceId: string // 日志追踪id
  content: string // 内容
  extension: string // 扩展
}

// 交互日志 API
export const InteractionLogApi = {
  // 查询交互日志分页
  getInteractionLogPage: async (params: any) => {
    return await request.get({ url: `/lm/interaction-log/page`, params })
  },

  // 查询交互日志详情
  getInteractionLog: async (id: number) => {
    return await request.get({ url: `/lm/interaction-log/get?id=` + id })
  },

  // 新增交互日志
  createInteractionLog: async (data: InteractionLogVO) => {
    return await request.post({ url: `/lm/interaction-log/create`, data })
  },

  // 修改交互日志
  updateInteractionLog: async (data: InteractionLogVO) => {
    return await request.put({ url: `/lm/interaction-log/update`, data })
  },

  // 删除交互日志
  deleteInteractionLog: async (id: number) => {
    return await request.delete({ url: `/lm/interaction-log/delete?id=` + id })
  },

  // 导出交互日志 Excel
  exportInteractionLog: async (params) => {
    return await request.download({ url: `/lm/interaction-log/export-excel`, params })
  }
}